<!DOCTYPE html>
<html>
<head>
<title>详情列表</title>
<#include "/header.html">
	<link type="text/css" rel="stylesheet" href="${request.contextPath}/statics/plugins/jedate/jeDate-test.css">
	<link type="text/css" rel="stylesheet" href="${request.contextPath}/statics/plugins/jedate/skin/jedate.css">
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">
			<form>

			<div class="form-inline col-sm-2 col-md-1">
				<input type="text" style="width: 150px;" class="jeinput col-md-1 form-control" id="startTime" placeholder="活动开始时间" readonly >
				<input type="text" style="width: 150px;margin-left: 10px" class="jeinput col-md-1 form-control" id="endTime" placeholder="活动结束时间" readonly >
			</div>
			<div class="form-group col-sm-2" style="width: 200px;">
				<select class="col-md-1 form-control" id="type" style="width: 150px;">
					<option value="0"> 请选择类型</option>
				</select>
			</div>
			<div class="form-group col-sm-2 " style="width: 200px;">
				<select class="col-md-1 form-control" id="level" style="width: 150px;">
					<option value="0"> 请选择vip等级</option>
				</select>
			</div>
				<a class="btn btn-default" @click="query">查询</a>
				<input type="reset" class="btn btn-default" @click="clean" value="清空" />
				<input type="button" class="btn btn-default" @click="add" value="添加" />
			</form>
			<!--<#if shiro.hasPermission("sys:agent:save")>
			<a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>-->
			<!--<#if shiro.hasPermission("sys:agent:update")>
			<a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("sys:user:delete")>
			<a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>-->
		</div>
			<table id="jqGrid" ></table>

	    <div id="jqGridPager"></div>
    </div>


	<div v-show="showAdd" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
			<div class="form-group">
				<div class="col-sm-2 control-label"> 活动类型:</div>
				<div class="col-sm-10">
                    <select class="col-md-1 form-control" id="addType" v-model="activeInfo.activeId" >
                        <option value="0"> 请选择类型</option>
                    </select>
				</div>
			</div>
            <div class="form-group">
                <div class="col-sm-2 control-label"> 等级选择:</div>
                <div class="col-sm-10">
                    <select class="col-md-1 form-control" id="addLevel" v-model="activeInfo.level" >
                        <option value="0"> 请选择vip等级</option>
                    </select>
                </div>
            </div>
			<div class="form-group">
				<div class="col-sm-2 control-label">开始时间:</div>
				<div class="col-sm-10">
                    <input type="text" class="jeinput col-md-1 form-control" id="instart" placeholder="活动开始时间" readonly >
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">结束时间:</div>
				<div class="col-sm-10">
                    <input type="text"  class="jeinput col-md-1 form-control" id="inend" placeholder="活动结束时间" readonly >
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">合伙人需求:</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="activeInfo.vipNum" />
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">激活需求:</div>
				<div class="col-sm-10">
                    <input type="text" class="form-control" v-model="activeInfo.activityNum" />
				</div>
			</div>
            <div class="form-group" v-show="showCycle">
                <div class="col-sm-2 control-label">购买需求:</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="activeInfo.buyNum" />
                    </div>
            </div>
			<div class="form-group">
				<div class="col-sm-2 control-label">激活奖金:</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="activeInfo.money" />
                </div>
			</div>
            <div class="form-group">
                <div class="col-sm-2 control-label">活动须知:</div>
                <div class="col-sm-10">
                    <textarea  class="form-control" v-model="activeInfo.remark" ></textarea>
                </div>
            </div>
			<div class="form-group">
				<div class="col-sm-2 control-label"></div>
				<input type="button" class="btn btn-primary" @click="insert" value="确定"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>



	<div v-show="showUpdate" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
			<input type="hidden" />
			<div class="form-group">
				<div class="col-sm-2 control-label">用户名</div>
				<div class="col-sm-10">
					<input type="text" class="form-control"   />
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">修改密码</div>
				<div class="col-sm-10">
					<input type="text" class="form-control"  />
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">上级推荐人</div>
				<div class="col-sm-10">
					<input type="text" class="form-control"  />
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">上级推荐人手机号码</div>
				<div class="col-sm-10">
					<input type="text" class="form-control"  />
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">当前等级</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" />
				</div>
			</div>


			<div class="form-group">
				<div class="col-sm-2 control-label"></div>
				<input type="button" class="btn btn-primary" @click="update" value="确定"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>
</div>

<!-- 选择封禁类别 -->
<div id="freezAgent" style="display: none;padding:10px;">
	<input type="hidden" id="agentId"/>
	<h3>请选择封禁类别</h3>
</div>

<script src="${request.contextPath}/statics/js/modules/active/activelist.js?_${.now?long}"></script>
<script src="${request.contextPath}/statics/plugins/jedate/jedate.js"></script>

<script type="text/javascript">
    var start = {}, end = {};
    jeDate('#startTime',{

        format: 'YYYY-MM-DD hh:mm:ss',
        minDate: '2014-06-16 23:59:59', //设定最小日期为当前日期
        maxDate: function (that) {
            //that 指向实例对象
            return jeDate.valText(that.valCell) == "" ? jeDate.nowDate({DD:0}) : start.maxDate;
        }, //设定最大日期为当前日期
        donefun: function(obj){
            end.minDate = obj.val; //开始日选好后，重置结束日的最小日期
            jeDate("#endTime",LinkageEndDate(false));
        }
    });
    jeDate('#endTime',LinkageEndDate);

    function LinkageEndDate(istg) {
        return {
            trigger : istg,
            format: 'YYYY-MM-DD hh:mm:ss',
            minDate: function (that) {
                //that 指向实例对象
                var nowMinDate = jeDate.valText('#startTime') == "" && jeDate.valText(that.valCell) == "";
                return nowMinDate ? jeDate.nowDate({DD:0}) : end.minDate ;
            }, //设定最小日期为当前日期
            maxDate: '2099-06-16 23:59:59', //设定最大日期为当前日期
            donefun: function(obj){
                start.maxDate = obj.val; //将结束日的初始值设定为开始日的最大日期
            }
        };
    }
</script>
</body>
</html>